Source File
query.go
Belonging Package
github.com/PuerkitoBio/goquery
package goqueryimport// Is checks the current matched set of elements against a selector and// returns true if at least one of these elements matches.func ( *Selection) ( string) bool {return .IsMatcher(compileMatcher())}// IsMatcher checks the current matched set of elements against a matcher and// returns true if at least one of these elements matches.func ( *Selection) ( Matcher) bool {if len(.Nodes) > 0 {if len(.Nodes) == 1 {return .Match(.Nodes[0])}return len(.Filter(.Nodes)) > 0}return false}// IsFunction checks the current matched set of elements against a predicate and// returns true if at least one of these elements matches.func ( *Selection) ( func(int, *Selection) bool) bool {return .FilterFunction().Length() > 0}// IsSelection checks the current matched set of elements against a Selection object// and returns true if at least one of these elements matches.func ( *Selection) ( *Selection) bool {return .FilterSelection().Length() > 0}// IsNodes checks the current matched set of elements against the specified nodes// and returns true if at least one of these elements matches.func ( *Selection) ( ...*html.Node) bool {return .FilterNodes(...).Length() > 0}// Contains returns true if the specified Node is within,// at any depth, one of the nodes in the Selection object.// It is NOT inclusive, to behave like jQuery's implementation, and// unlike Javascript's .contains, so if the contained// node is itself in the selection, it returns false.func ( *Selection) ( *html.Node) bool {return sliceContains(.Nodes, )}
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |